package com.navi.loaddata.core.gpEntity;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "wpp_cdefect_panel_sum", schema = "sor", catalog = "")
@IdClass(WppCdefectPanelSumPK.class)
public class WppCdefectPanelSum {
    private Timestamp evtTimestamp;
    private String caldDate;
    private String jgeCnt;
    private String opeId;
    private String prodId;
    private String eqptId;
    private String owner;
    private String ownertype;
    private String glassGrade;
    private String glassRejCode;
    private Integer hourKeyFk;
    private String shfId;
    private String shopId;
    private Integer shopKeyFk;
    private Timestamp dbTimestamp;
    private Integer panelQty;

    @Id
    @Column(name = "evt_timestamp")
    public Timestamp getEvtTimestamp() {
        return evtTimestamp;
    }

    public void setEvtTimestamp(Timestamp evtTimestamp) {
        this.evtTimestamp = evtTimestamp;
    }

    @Basic
    @Column(name = "cald_date")
    public String getCaldDate() {
        return caldDate;
    }

    public void setCaldDate(String caldDate) {
        this.caldDate = caldDate;
    }

    @Id
    @Column(name = "jge_cnt")
    public String getJgeCnt() {
        return jgeCnt;
    }

    public void setJgeCnt(String jgeCnt) {
        this.jgeCnt = jgeCnt;
    }

    @Id
    @Column(name = "ope_id")
    public String getOpeId() {
        return opeId;
    }

    public void setOpeId(String opeId) {
        this.opeId = opeId;
    }

    @Basic
    @Column(name = "prod_id")
    public String getProdId() {
        return prodId;
    }

    public void setProdId(String prodId) {
        this.prodId = prodId;
    }

    @Basic
    @Column(name = "eqpt_id")
    public String getEqptId() {
        return eqptId;
    }

    public void setEqptId(String eqptId) {
        this.eqptId = eqptId;
    }

    @Basic
    @Column(name = "owner")
    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    @Basic
    @Column(name = "ownertype")
    public String getOwnertype() {
        return ownertype;
    }

    public void setOwnertype(String ownertype) {
        this.ownertype = ownertype;
    }

    @Id
    @Column(name = "glass_grade")
    public String getGlassGrade() {
        return glassGrade;
    }

    public void setGlassGrade(String glassGrade) {
        this.glassGrade = glassGrade;
    }

    @Id
    @Column(name = "glass_rej_code")
    public String getGlassRejCode() {
        return glassRejCode;
    }

    public void setGlassRejCode(String glassRejCode) {
        this.glassRejCode = glassRejCode;
    }

    @Basic
    @Column(name = "hour_key_fk")
    public Integer getHourKeyFk() {
        return hourKeyFk;
    }

    public void setHourKeyFk(Integer hourKeyFk) {
        this.hourKeyFk = hourKeyFk;
    }

    @Basic
    @Column(name = "shf_id")
    public String getShfId() {
        return shfId;
    }

    public void setShfId(String shfId) {
        this.shfId = shfId;
    }

    @Basic
    @Column(name = "shop_id")
    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    @Basic
    @Column(name = "shop_key_fk")
    public Integer getShopKeyFk() {
        return shopKeyFk;
    }

    public void setShopKeyFk(Integer shopKeyFk) {
        this.shopKeyFk = shopKeyFk;
    }

    @Basic
    @Column(name = "db_timestamp")
    public Timestamp getDbTimestamp() {
        return dbTimestamp;
    }

    public void setDbTimestamp(Timestamp dbTimestamp) {
        this.dbTimestamp = dbTimestamp;
    }

    @Basic
    @Column(name = "panel_qty")
    public Integer getPanelQty() {
        return panelQty;
    }

    public void setPanelQty(Integer panelQty) {
        this.panelQty = panelQty;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WppCdefectPanelSum that = (WppCdefectPanelSum) o;

        if (evtTimestamp != null ? !evtTimestamp.equals(that.evtTimestamp) : that.evtTimestamp != null) return false;
        if (caldDate != null ? !caldDate.equals(that.caldDate) : that.caldDate != null) return false;
        if (jgeCnt != null ? !jgeCnt.equals(that.jgeCnt) : that.jgeCnt != null) return false;
        if (opeId != null ? !opeId.equals(that.opeId) : that.opeId != null) return false;
        if (prodId != null ? !prodId.equals(that.prodId) : that.prodId != null) return false;
        if (eqptId != null ? !eqptId.equals(that.eqptId) : that.eqptId != null) return false;
        if (owner != null ? !owner.equals(that.owner) : that.owner != null) return false;
        if (ownertype != null ? !ownertype.equals(that.ownertype) : that.ownertype != null) return false;
        if (glassGrade != null ? !glassGrade.equals(that.glassGrade) : that.glassGrade != null) return false;
        if (glassRejCode != null ? !glassRejCode.equals(that.glassRejCode) : that.glassRejCode != null) return false;
        if (hourKeyFk != null ? !hourKeyFk.equals(that.hourKeyFk) : that.hourKeyFk != null) return false;
        if (shfId != null ? !shfId.equals(that.shfId) : that.shfId != null) return false;
        if (shopId != null ? !shopId.equals(that.shopId) : that.shopId != null) return false;
        if (shopKeyFk != null ? !shopKeyFk.equals(that.shopKeyFk) : that.shopKeyFk != null) return false;
        if (dbTimestamp != null ? !dbTimestamp.equals(that.dbTimestamp) : that.dbTimestamp != null) return false;
        if (panelQty != null ? !panelQty.equals(that.panelQty) : that.panelQty != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = evtTimestamp != null ? evtTimestamp.hashCode() : 0;
        result = 31 * result + (caldDate != null ? caldDate.hashCode() : 0);
        result = 31 * result + (jgeCnt != null ? jgeCnt.hashCode() : 0);
        result = 31 * result + (opeId != null ? opeId.hashCode() : 0);
        result = 31 * result + (prodId != null ? prodId.hashCode() : 0);
        result = 31 * result + (eqptId != null ? eqptId.hashCode() : 0);
        result = 31 * result + (owner != null ? owner.hashCode() : 0);
        result = 31 * result + (ownertype != null ? ownertype.hashCode() : 0);
        result = 31 * result + (glassGrade != null ? glassGrade.hashCode() : 0);
        result = 31 * result + (glassRejCode != null ? glassRejCode.hashCode() : 0);
        result = 31 * result + (hourKeyFk != null ? hourKeyFk.hashCode() : 0);
        result = 31 * result + (shfId != null ? shfId.hashCode() : 0);
        result = 31 * result + (shopId != null ? shopId.hashCode() : 0);
        result = 31 * result + (shopKeyFk != null ? shopKeyFk.hashCode() : 0);
        result = 31 * result + (dbTimestamp != null ? dbTimestamp.hashCode() : 0);
        result = 31 * result + (panelQty != null ? panelQty.hashCode() : 0);
        return result;
    }
}
